Skip to content

Conversation

@fintelia
Copy link
Contributor

@fintelia fintelia commented Jul 20, 2025

This PR adds tests of the various flush kinds to ensure that all backends implement them consistently. The cases are carefully constructed so that even quite different backend implementations are likely to produce the expected output. In particular, it counts on the encoder detecting when the input is/isn't compressible and writing either compressed or stored blocks accordingly.

Tests pass for me with the zlib, zlib-ng, zlib-rs and cloudflare_zlib backends. The miniz_oxide backend requires Frommi/miniz_oxide#179 as otherwise it treats partial flushes as "no flush" (!)

@Byron
Copy link
Member

Byron commented Dec 9, 2025

Could we get this done towards the end of the year? Maybe it works now if the PR was rebased?

@Byron
Copy link
Member

Byron commented Dec 9, 2025

Right, thanks a lot!

I think I may have asked @oyvindln that before and apologise this question is redundant or repetitive, but given my ignorance, is a release of miniz_oxide in the cards till the end of the year? Thanks (and sorry) again.

@oyvindln
Copy link
Contributor

oyvindln commented Dec 9, 2025

Yeah I'm hoping to get something out before the end of the year, just need to resolve a few small things.

@fintelia fintelia changed the title Add unit tests of the different flush kinds Upgrade miniz_oxide and add unit tests of the different flush kinds Jan 17, 2026
@fintelia fintelia marked this pull request as ready for review January 17, 2026 04:13
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fantastic, thanks so much!

Could we squash this PR into one and, most importantly, add a message that describes the change and ideally the motivation?

While I could do it with the GH UI when merging, I don't like to put words into peoples mouths given that their name is all over it 😅.

This PR adds tests of the various flush kinds to ensure that all backends implement them consistently. The cases are carefully constructed so that even quite different backend implementations are likely to produce the expected output. In particular, it counts on the encoder detecting when the input is/isn't compressible and writing either compressed or stored blocks accordingly.

This also upgrades miniz_oxide and corrects it to use partial fushes when requested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants